package com.hzxcloudserviceb.controller;

import com.hzxcloudserviceb.client.ServiceAClient;
import com.hzxcloudserviceb.kafka.MessageConsumer;
import com.hzxcloudserviceb.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * Created by huzuxing on 2021/4/15.
 */
@RestController
public class UserController {

    @Autowired
    private ServiceAClient serviceAClient;

    @Autowired
    private MessageService messageService;

    @RequestMapping("/call")
    public String call() {
        messageService.send(UUID.randomUUID().toString());
        return serviceAClient.hello() + " Word";
    }
}
